//
//  Tool.h
//  iPadDev01
//
//  Created by smu on 11-7-28.
//  Copyright 2011年 duk. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol ToolDelegate;
@protocol Drawable;
@protocol Tool <NSObject>

@property (assign, nonatomic) id <ToolDelegate> delegate;

- (void)activate;
- (void)deactivate;

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;

- (void)drawTemporary;
@end



//每个工具可以反过来与反过来与控制器交互
@protocol ToolDelegate

- (void)addDrawable:(id <Drawable>)d;
- (UIView *)viewForUseWithTool:(id <Tool>)t;
- (UIColor *)strokeColor;
- (UIColor *)fillColor;
- (CGFloat)strokeWidth;

@end
